#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void sort(int** p,int sz)
{
	for (int i = 0; i < sz - 1; i++)
	{
		for (int j = 0; j < sz - 1 - i; j++)
		{
			if (*(*(p+ j)) > *(*(p + j + 1)))
			{
				int tmp = *(*(p + j));
					*(*(p + j)) = *(*(p + j + 1));
				*(*(p + j + 1)) = tmp;
			}
		}
	}
}
int main()
{
	int arr[10] = { 10,9,8,7,6,5,4,3,2,1 };
	int* p[10] = {0};
	for (int i = 0; i < 10; i++)
		p[i] = &arr[i];
	for (int i = 0; i < 10; i++)
		printf("%d ", *(p+i));
	int** pp = p;
	sort(pp,10);
	for (int i = 0; i < 10; i++)
		printf("%d ", arr[i]);
	return 0;
}